<!DOCTYPE html> 
<html>
<head>
<meta charset="utf-8">
<title>jQuery  Mobile  Web 应用程序</title>
<link href="../jquery.mobile-1.3.2.css" rel="stylesheet" type="text/css"/>
<script src="../jquery.js" type="text/javascript"></script>

<script src="../jquery.mobile-1.3.2.js" type="text/javascript"></script>
<script src="../cordova.js" type="text/javascript"></script>
<script type="text/javascript">
	$(document).ready(function(){
			document.addEventListener("deviceready", myDeviceReadyListener, false);				
	});	
	function myDeviceReadyListener(){
		//navigator.app.loadUrl("http://m.chinaz.com/", {wait:0, loadingDialog:"Wait,Loading App", loadUrlTimeoutValue: 60000});
		
		console.log("设备加载完毕!");		
		$('#loadUrl').click(function(){
			loadUrl();
		})		
		$('#exitApp').click(function(){
			exitApp();
		})	
		
		$('#splashscreenShow').click(function(){
			splashscreenShow();
		})
			
	}
	//退出app
	function exitApp() {
		navigator.app.exitApp();
	}
	//加载外部页面	
	function loadUrl(){
		navigator.app.loadUrl("http://m.chinaz.com/", {wait:2000, loadingDialog:"Wait,Loading App", loadUrlTimeoutValue: 60000}); 
	}	
	function splashscreenShow(){
		navigator.splashscreen.show();
	}
</script>
</head> 
<body>
<div data-role="page" id="indexPage">
	<div data-role="header">
		<h1>第 1  页</h1>
	</div>
	<div data-role="content">		
			<a href="#" data-role="button" id="loadUrl">加载chinaz</a>
			<a href="#" data-role="button" id="splashscreenShow">splashscreenShow</a>
			<a href="#" data-role="button" id="exitApp">退出app</a>		
	</div>
	<div data-role="footer">
		<h4>底部</h4>
	</div>
</div>

</body>
</html>
